			<div class="post">
				<h2 class="title">
                            <?php
                            $allItems = $this->allItems;
                            $currentPage = $this->currentPage;

                            if ($currentPage) {
                                // check exists parent
                                if ($currentPage['all_parent']) {
                                    $allParent = explode(',', $currentPage['all_parent']);
                                    if (isset($allParent[0])) {
                                        $allCategory = $this->allCategory;
                                        foreach($allParent as $parentID):
                                            $parent = $allCategory[$parentID];
                                            // check to ignore root
                                            if ($parent['left'] != 1) {
                                            ?>
                                                <a href="<?php echo BASE_PATH . '/' . CURR_APP ?>?pid=<?php echo $parent['category_id']?>" style="font-weight:bold;"><?php echo $parent['admin_title'];?></a> >>
                                            <?php
                                            }
                                        endforeach;
                                    }
                                    echo "<span style='font-weight:none;'>" . $currentPage['admin_title'] . "</span>";
                                }
                            }
                            ?>
                </h2>
                <div class="story">
<?php
$catid = $this->catid;
$allCat =$this->allCategory;
$currentCat = $allCat[$catid];

//print_r($currentCat)
//foreach ($array as $key => $currentCat) {
    
//}
@$children = $currentCat['children'];
if(count($children)>0){
foreach ($children as $key => $value) {
    //print_r($allCat[$value]);
    $child = $allCat[$value];
    ?>
<div style="padding-bottom: 5px ">
            <?php
            $margin = "";
            if ($child['main_image']) {
                $path = pathinfo($child['main_image'], PATHINFO_DIRNAME);
                $fileName = pathinfo($child['main_image'], PATHINFO_BASENAME);
                $margin = "margin-left: 110px;";
            ?>
            <div style="float:left;width: 100px">
                <img src="<?=ImageUtil::getImage($path,$fileName,100,100, 100,FALSE)?>" class="border">
            </div>
            <?php
            }
            ?>
        <div style="<?=$margin?>">
            <span>
                <a href="<?=BASE_URL?>?pid=<?=$child['category_id']?>"  style="color: #ff240d"><?=$child['admin_title']?></a>
            </span>
        <?php
                    //print_r ($child);
                   @$childcon = $child['children'];
                   ?>
            <div style="padding: 10px 0px" >
            <?php
                if(count($childcon)>0){
                    foreach ($childcon as $key => $value1):
                        $arrraychil = $allCat[$value1];
                       // print_r($arrraychil);
                        ?>
            
            <span style="padding-right: 20px">
                <a href="<?=BASE_URL?>?pid=<?=$arrraychil['category_id']?>" ><?=$arrraychil['admin_title']?></a>
            </span>
            
                        <?php
                    endforeach;
                }
            ?>

                    
        
            </div>
        </div>
        <div style="clear: both"></div>
    </div>
<?php
    
        }
}
?>
                </div>
</div>
